{extend name="light-year/layout/master/detail" /}

{block name="title"}版本管理{/block}
{block name="page-title"}版本{/block}

{block name="content"}
<input name="version_id" class="form-control" type="hidden" value="{if $detail}{$detail->version_id}{/if}" />
<div class="form-group">
    <label><span class="text-danger">*</span> 版本名称：</label>
    <input type="text" class="form-control" name="version_name" value="{if $detail}{$detail->version_name}{/if}" placeholder="输入版本名称" />
    <small class="help-block">
        <i class="mdi mdi-information"></i>
        唯一标识
    </small>
</div>
<div class="form-group">
    <label><span class="text-danger">*</span> 版本号：</label>
    <input type="text" class="form-control" name="version_number" value="{if $detail}{$detail->version_number}{/if}" placeholder="输入版本号" />
    <small class="help-block">
        <i class="mdi mdi-information"></i>
        唯一版本号标识
    </small>
</div>
<div class="form-group">
    <label> 内容：</label>
    <div id="test-editor" name="version_content">
        <textarea style="display:none;" name="version_content">{if $detail}{$detail->version_content}{/if}</textarea>
    </div>
</div>
<div class="form-group">
    <label> 排序：</label>
    <input type="number" class="form-control" name="version_sort" value="{if $detail}{$detail->version_sort}{else/}0{/if}" placeholder="输入排序" />
    <small class="help-block">
        <i class="mdi mdi-information"></i>
        从小到大，升序
    </small>
</div>
<div class="form-group">
    <label>
        是否启用：
    </label>
    <div class="clearfix">
        <label class="lyear-radio radio-inline radio-primary">
            <input type="radio" name="is_check" value="0" {if (empty($detail) || $detail->is_check === 0) }checked{/if}><span>禁用</span>
        </label>
        <label class="lyear-radio radio-inline radio-primary">
            <input type="radio" name="is_check" value="1" {if (empty($detail) || $detail->is_check === 1) }checked{/if}><span>启用</span>
        </label>
    </div>
</div>
<div class="form-group">
    <button type="submit" class="btn btn-primary ajax-post" target-form="add-form">确 定</button>
    <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
</div>
{/block}

{block name="script"}
{include file="light-year/layout:plugins/editormd" /}
<script type="text/javascript">
    window.onload = function () {
        closeLayerLoading(closeAllLayer);
    }
</script>
{/block}